package com.rent.collectrent.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.rent.collectrent.entity.WriteOffSummary;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;

/**
 * @author news
 * *@date 2025/9/28
 */
@Mapper
public interface WriteOffSummaryMapper extends BaseMapper<WriteOffSummary> {
    /**
     * 根据批次号更新汇总信息
     */
    @Transactional()
    int updateSummaryByBatchNo(@Param("batchNo") String batchNo,
                               @Param("totalCount") Integer totalCount,
                               @Param("totalPrincipal") BigDecimal totalPrincipal,
                               @Param("totalInterest") BigDecimal totalInterest,
                               @Param("durationSeconds") Long durationSeconds,
                               @Param("status") String status);
}
